<%@ page import="com.ws.lv.util.Res" %><%--
  Created by IntelliJ IDEA.
  User: Adminis
  Date: 2025/3/19
  Time: 11:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>分类页</title>
    <!-- Bootstrap -->
    <link href="${pageContext.request.contextPath}/home/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/home/css/common.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/home/css/index.css">

    <style>
        .topbar {
            position: relative
        }

        .hottel, .haslogin {
            position: absolute;
            top: 12px;
            right: 50px
        }

        .hottel p {
            cursor: pointer;
            font-weight: 700;
            float: left;
            width: 100px;
            border: 1px solid orange;
            text-align: center;
            height: 45px;
            line-height: 45px;
            margin-right: 10px
        }

        .hottel a {
            color: #666;
            text-decoration: none
        }

        .haslogin {
            top: 45px;
            right: 0
        }

        .haslogin p {
            font-weight: 700;
            float: left;
            margin-right: 30px;
            font-size: 18px
        }

        .jx {
            margin-top: 20px;
        }


        .tx {
            display: inline-block;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            float: left;
            margin-top: -20px;
            margin-right: 10px;
        }

        .navitem .nav li a:hover {
            color: #ffc900;
            background-color: #4fd5df;
        }

        #fenye {
            width: 1200px;
            margin: 0 auto;
        }

        .page_num_inf {
            width: 1200px;
            margin: 0 auto;
        }

        #fenye ul .active {
            background-color: #fc8989;
        }

        #fenye ul li a{
            display: inline-block;
            line-height: 40px;
            height: 40px;
            width: 40px;
        }

        #fenye ul li a:hover {
            background-color: #fc8989;
            text-decoration: none;
        }

        .company {
            background-color: whitesmoke;
            border-top: 3px solid rgba(15, 250, 231, 0.6);
        }

        .company .ctr {
            color: black;
            margin: 10px auto;
            font-size: 16px;
        }

        .ctrimg img {
            display: inline-block;
            width: 120px;
            height: 120px;
            vertical-align: middle;
            margin: auto 60px;
        }
    </style>
</head>
<body>
<!--引入头部-->
<!-- 头部 start -->
<header id="header">
    <div class="header_wrap">
        <div class="topbar">
            <div class="logo">
                <a href="/"><img src="${pageContext.request.contextPath}/home/images/logo.png" style="height: 60px;"
                                 alt=""></a>
            </div>
            <div class="search">
                <form action="${pageContext.request.contextPath}/homepage/toRoute_list" method="post">
                    <input name="route_name" type="text" placeholder="请输入路线名称"
                           class="search_input" autocomplete="off">
                    <button class="search-button" type="submit">搜索</button>
                </form>
            </div>

            <c:if test="${u!=null}">
                <div class="haslogin">
                    <p><a href="${pageContext.request.contextPath}/homepage/toMypage">
                        <img src="<%=Res.homeTxFileUrl%>${u.user_tx}" class="tx">
                        欢迎：${u.user_name}
                    </a>
                    </p>
                    <p><a href="${pageContext.request.contextPath}/user/outLogin">退出登录</a></p>
                </div>
            </c:if>
            <c:if test="${u==null}">
                <div class="hottel">
                    <a href="${pageContext.request.contextPath}/homepage/toHomeLogin"><p>登录</p></a>
                    <a href="${pageContext.request.contextPath}/homepage/toRegister"><p>注册</p></a>
                </div>
            </c:if>
        </div>
    </div>
</header>
<!-- 头部 end -->
<!-- 首页导航 -->
<div class="navitem">
    <ul class="nav">
        <li><a href="${pageContext.request.contextPath}/homepage/toHomePage">首页</a></li>
        <c:forEach items="${types}" var="type">
            <li class="${type_id == type.type_id ? 'nav-active' : ''}"><a
                    href="${pageContext.request.contextPath}/homepage/toType?type_id=${type.type_id}">${type.type_name}</a>
            </li>
        </c:forEach>
        <li><a href="${pageContext.request.contextPath}/homepage/toFavoriterank">收藏排行榜</a></li>
    </ul>
</div>
<!-- 导航栏 end -->
<section class="jx">
    <div class="gn">
        <div class="row">

            <c:forEach items="${pageInfo.list}" var="route">
                <div class="col-md-3">
                    <a href="${pageContext.request.contextPath}/homepage/toRoute_detail?route_id=${route.route_id}">
                        <img src="<%=Res.mainFileUrl%>${route.routh_mainImage}" width="284px" height="165px">
                        <div class="has_border">
                            <h3>${route.route_name}</h3>
                            <div class="price">网付价<em>￥</em><strong>${route.route_price}</strong><em>起</em></div>
                        </div>
                    </a>
                </div>
            </c:forEach>

            <c:if test="${pageInfo.list.size() == 0}">
                <div style="text-align: center;font-size: 30px;color: red">
                    暂无数据~~~
                </div>
            </c:if>


        </div>
    </div>
</section>
<%--前五后四--%>
<c:if test="${pageInfo.list.size() > 0}">
    <c:if test="${pageInfo.pages>=10}">
        <c:set var="begin" value="1"></c:set>
        <c:set var="end" value="10"></c:set>
        <c:if test="${pageInfo.pageNum>5}">
            <c:set var="begin" value="${pageInfo.pageNum-4}"></c:set>
            <c:set var="end" value="${pageInfo.pageNum+5}"></c:set>
        </c:if>
        <c:if test="${pageInfo.pageNum+5>pageInfo.pages}">
            <c:set var="begin" value="${pageInfo.pages-9}"></c:set>
            <c:set var="end" value="${pageInfo.pages}"></c:set>
        </c:if>
    </c:if>

    <c:if test="${pageInfo.pages<10}">
        <c:set var="begin" value="1"></c:set>
        <c:set var="end" value="${pageInfo.pages}"></c:set>
    </c:if>

    <div class="page_num_inf">
        <span style="color: black">当前第<b style="color: red">${pageInfo.pageNum}</b>页 共<b
                style="color: red">${pageInfo.pages}</b>页 共<b style="color: red">${pageInfo.total}</b>条数据</span>
    </div>
    <div class="pageNum" id="fenye">
        <ul>
            <li>
                <a href="${pageContext.request.contextPath}/homepage/toType?currentPage=1&type_id=${type_id}">首页</a>
            </li>
            <li>
                <a href="${pageContext.request.contextPath}/homepage/toType?currentPage=${pageInfo.prePage}&type_id=${type_id}">&laquo;</a>
            </li>

            <c:forEach begin="${begin}" end="${end}" var="page">
                <li ${page eq pageInfo.pageNum?"class='active'":''}>
                    <a href="${pageContext.request.contextPath}/homepage/toType?currentPage=${page}&type_id=${type_id}">${page}</a>
                </li>
            </c:forEach>

            <li>
                <a href="${pageContext.request.contextPath}/homepage/toType?currentPage=${pageInfo.nextPage}&type_id=${type_id}">&raquo;</a>
            </li>

            <li>
                <a href="${pageContext.request.contextPath}/homepage/toType?currentPage=${pageInfo.pages}&type_id=${type_id}">尾页</a>
            </li>
        </ul>
    </div>
</c:if>

<!-- 尾部 start-->
<footer id="footer" style="margin-top: 20px">
    <div class="company">
        <div class="ctr">顽石教育有限公司 版权所有Copyright 2019-2020, All Rights Reserved 京ICP备12390</div>
        <div class="ctr">
            顽石教育客服中心设立在江苏南京及江苏宿迁，来电显示号码请查看： 顽石教育会员中心外呼电话号码汇总
        </div>
        <div class="ctr">
            北京顽石教育国际旅行社有限公司，旅行社业务经营许可证编号：L-BJ-CJ00144　　上海顽石教育国际旅行社有限公司，旅行社业务经营许可证编号：L-SH-CJ00107
        </div>
        <div class="ctr">
            Copyright © 2006-2025 南京顽石教育科技有限公司 lzc.ws.com | 营业执照 | ICP证：苏B2-20130006 |
            苏ICP备12009060号-4
            | 苏网食备A32000000032 | 石家庄旅游网
        </div>
        <div class="ctr">
            关于我们 顽石教育经过多年打拼 终于在石家庄市获得了一席之地 这代表着我们公司及团队的成长与付出
            我们一直以“专业、高效、创新” 作为团队的精神 多年来打压着外部及内部的乐色公司 一步步往上爬 终于在2025年本公司的项目上市
            获得多平台联合认可 全国服务热线：400-888-8888
        </div>
        <div class="ctr">
            感谢大家这么长时的陪伴 愿我们的努力 为每一位顾客带来一份快乐
        </div>
        <div class="ctrimg">
            <img src="${pageContext.request.contextPath}/home/images/kuaishou.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/douyin.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/xiaomi.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/huawei.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/jiangbei.png" alt="">
            <img src="${pageContext.request.contextPath}/home/images/jingcha.png" alt="">
        </div>
    </div>
</footer>
</body>
</html>